﻿<table>
<tr>
	<td colspan="2">
		<h1><?php echo $model->title; ?></h1>
		<?php 
		// $this->widget('bootstrap.widgets.TbBreadcrumbs', array(
		// 'links'=>array('Library'=>'#', 'Data'),
		// )); 
		?>
	</td>
</tr>
<tr><td colspan="2"><img src="css/von1.png"></td></tr>
<tr>
	<td>
		<?php 
			$this->widget('bootstrap.widgets.TbButton', array(
				'label'=>'Infók',
				'type'=>'inverse',
				'htmlOptions'=>array('data-title'=>'Információk', 'data-content'=>"Készítette: Jani 2011-01-01 ", 'rel'=>'popover'),
			)); 
		?>
	</td>
	<td width=70px>
		<?php 
		if (!Yii::app()->user->isGuest) {
		
			if (CreativesController::actionIsFavCrea($model->id) == 0)
			{
				//echo CHtml::link('Cikk a Kedvencekbe',array('AddFavCrea','id'=>$model->id));
				?>
				<a href="index.php?r=creatives/AddFavCrea&id=<?php echo $model->id;?>" class="" rel="tooltip" data-title="Hozzáadás a kedvencekhez">
				<img src="/files/blue_star.jpg" alt="" width="25" height="25">
				</a>
				<?php
			}
			else
			{
				//echo CHtml::link('Mégsem cikk',array('DelFavCrea','id'=>$model->id));
				?>
				<a href="index.php?r=creatives/DelFavCrea&id=<?php echo $model->id;?>" class="" rel="tooltip" data-title="Törlés a kedvencekből">
				<img src="/files/grey_star.jpg" alt="" width="25" height="25">
				</a>
				<?php
			}
		}
		if (!Yii::app()->user->isGuest) {

			if (CreativesController::actionIsFavUsr($model->creator_id) == 0) 
			{
				//echo CHtml::link('F a kedvencekbe',array('AddFavUsr','id'=>$model->id));
				?>
				<a href="index.php?r=creatives/AddFavUsr&id=<?php echo $model->id;?>" class="" rel="tooltip" data-title="Felhasználó a kedvencekbe">
				<img src="/files/green_star.jpg" alt="" width="25" height="25">
				</a>
				<?php
			}
			else
			{
				//echo CHtml::link('F kivétele...',array('DelFavUsr','id'=>$model->id));
				?>
				<a href="index.php?r=creatives/DelFavUsr&id=<?php echo $model->id;?>" class="" rel="tooltip" data-title="Felhasználó törlése a kedvencekből">
				<img src="/files/grey_star.jpg" alt="" width="25" height="25">
				</a>
				<?php
			}
		}	
		
		?>
	</td>
</tr>
<tr><td colspan="2"><img src="css/von1.png"></td></tr>
<tr><td colspan="2">
<?php 
	//description
	echo $model->description; 
?>
</td></tr>

</table>

<table class="view">
	<tr><td colspan="4"><img src="css/von1.png"></td></tr>
	<tr>
<?php
		//tabulator
		$this->widget('zii.widgets.CListView', array(
		'dataProvider'=>$dataprovider,
		'itemView'=>'_view_ctypes',
		'summaryText' => '',
		)); 
?>
	</tr>
		<tr><td colspan="4"><img src="css/von1.png"></td>
	</tr>
	<tr><td colspan="4">
		<?php
			//comments
			$this->widget('comments.widgets.ECommentsListWidget', array(
				'model' => $model,
			));
			//$this->widget('application.extensions.WSocialButton', array('style'=>'box'));
			?>
	</td></tr>
</table>
